﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace IURIP
{
    /// <summary>
    /// The Action interface. An action can work on one data block to extract and transform data from original data to logical data. 
    /// </summary>
    public interface IAction : IRunable
    {
        /// <summary>
        /// Gets or sets the original data for one data block. GetSourceComponent will set value if it is null. Each loop, it should be reset to null.
        /// </summary>
        XmlNode OriginalDataXml { get; set; }
        /// <summary>
        /// Gets or sets filter to get original data. It can be transfered from a process for target relationship. Each loop, it should be set new value.
        /// </summary>
        IFilter Filter { get; set; }
        /// <summary>
        /// Gets the place that the action works on in the target data. It is set only when enter the action and do not influenced by recursion.
        /// </summary>
        List<XmlNode> TgtParentNodes { get; }
        /// <summary>
        /// Gets or sets the current parent node that the action should work on. It can be one of TgtParentNodes or recursive node(TgtExtractedListNodes)
        /// </summary>
        XmlNode TgtCurrentParentNode { get; set; }

        /*
        /// <summary>
        /// Gets the new extracted list nodes. It can be acted as TgtParentNodes in recursion.
        /// </summary>
        List<XmlNode> TgtExtractedListNodes { get; }
        /// <summary>
        /// Gets the recursive IDs. The recursive nodes can be removed by checking the recursive ids containing the new id or not. ID may only be refined after format component works
        /// </summary>
        List<string> RecursiveIDs { get; }
         * */
    }
}
